#ifndef _KEY_H
#define _KEY_H

#include <stdint.h>
#include "stm32f1xx_hal.h"
#include "main.h"

typedef enum {
    KEY_STATE_IDLE,
    KEY_STATE_DEBOUNCE,
    KEY_STATE_PRESSED,
    KEY_STATE_LONG_PRESSED
} KeyState;

void KeyInit(void); 

void KeyTask(uint8_t *u8KeyCnt);

#endif // _KEY_H